1. Field of the Invention
The present invention relates to an image processing device and method and program, and particularly relates to an image processing device and method and program wherein block size and block border position can be accurately measured.
2. Description of the Related Art
In the event of decoding encoded image data, noise may occur in the decoded image. For example, in the event of compressing image data with a compression method such as MPEG (Moving Picture Experts Group), an encoder divides image data into square blocks made up of multiple pixels, and subjects each divided block to DCT (Discrete Cosine Transform) processing. Therefore, when a decoder decodes the image data encoded with the MPEG method, in principle with the decoded image data, pixel value levels between pixels can differ at border portions of each block can arise, whereby block noise can readily occur.
A device to reduce or remove such block noise generally does so by applying an LPF (Low Pass Filter) over a known block size (e.g. 8 pixels×8 pixels if MPEG2) and at block border positions, and smoothing. However, for such smoothing, information of the input image data such as block size and block border position has to be available beforehand.
Accordingly, a technique has been proposed wherein cyclic nature is used in order to realize such processing to obtain the block sizes and block border positions in the input image (Japanese Unexamined Patent Application Publication No. 2007-028460).
Also, a method has been proposed wherein cyclic nature is not used, but block noise feature is used to cumulatively process weighted results in a spatial direction and hold the detection results at each pixel position (Japanese Unexamined Patent Application Publication No. 2005-012641).